package com.itheima.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageQuery<T>{

    private T t;

    private Integer page;
    private Integer pageSize;
    private Integer index;

    //计算索引
    public Integer getIndex(){
        return (page-1)*pageSize;
    }
}
